package pl.edu.agh.ki.ewywiadowka.client.dto;

import java.util.LinkedList;

import com.google.gwt.user.client.rpc.IsSerializable;

public class AttendantDTO extends SystemUserDTO implements IsSerializable {

	public Integer id;
	public String name;
	public String surname;
	public String address;
	public String telephone;
	public String work;
	
	//bo jest uzytkownikiem systemu
	
	//tabela lacznikowa
	public LinkedList<StudentDTO> students;

	public AttendantDTO() {}

	public AttendantDTO(Integer id, String name, String surname,
			String address, String telephone, String work, UserDTO user,
			LinkedList<StudentDTO> students) {
		super();
		this.id = id;
		this.name = name;
		this.surname = surname;
		this.address = address;
		this.telephone = telephone;
		this.work = work;
		this.user = user;
		this.students = students;
	}

	public String toString() {
		return name + " " + surname;
	}
	
	public boolean equals(AttendantDTO adto) {
		return name.equals(adto.name) && surname.equals(adto.surname) && address.equals(adto.address) && telephone.equals(adto.telephone) && work.equals(adto.work);
	}
}
